input_str = input('请输入一些内容:\n')

counts = {}

for item in input_str:
    if item.isalpha():
        counts['str1'] = counts.get('str1', 0) + 1
    elif item.isdigit():
        counts['num'] = counts.get('num', 0) + 1
    elif item == '':
        break

str_num = counts.get('str1', 0)
digit_num = counts.get('num', 0)
print(f'字符有: {str_num}个, 数字有:{digit_num}个')

input_str_again = input('请再次输入一些内容:\n')
char_counts = {}
for item in input_str_again:
    char_counts[item] = char_counts.get(item, 0) + 1
print(char_counts)
